<template>
  <div class="contact-home">
    <div class="code-view">
      <div class="code-view-con">
        <img width="130" height="130" :src="staticurl + company.qcode" alt />
        <van-row class="phone">
          <van-col span="10" style="text-align:right;">公司固话：</van-col>
          <van-col span="14" style="text-align:left;"> <span @click="callPhone(company.phone)">{{company.phone}}</span> </van-col>
        </van-row>
        <van-row class="phone" >
          <van-col span="10" style="text-align:right;">客服热线1：</van-col>
          <van-col span="14" style="text-align:left;"> <span @click="callPhone(company.tel1)">{{company.tel1}}</span> </van-col>
        </van-row>
        <van-row class="phone">
          <van-col span="10" style="text-align:right;">客服热线2：</van-col>
          <van-col span="14" style="text-align:left;"> <span  @click="callPhone(company.tel2)"> {{company.tel2}}</span></van-col>
        </van-row>
      </div>
    </div>
    <!-- <tabbar/> -->
  </div>
</template>

<script>
import { Row, Col } from 'vant';
import { CarMixin } from '../util/mixin.js';
export default {
  mixins: [CarMixin],
  components: {
    [Row.name]: Row,
    [Col.name]: Col,
  },
  async created(){
    await this.getCompany();
  },
  activated() {
    if (this.activeStatus !== 1) {
      this.setTabbarActive(1);
    }
  },
  methods: {
    callPhone(phone) {
      window.location = 'tel:' + phone;
    },
  },
};
</script>

<style lang="scss" scoped>
.contact-home {
  width: 100%;
  height: 100vh;
  background-image: url('../assets/img/contact-back.jpeg');
  background-position: 50% bottom;
  background-size: auto 120%;
  background-repeat: no-repeat;
  .code-view {
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    margin: auto;
    width: 90%;
    height: 55vh;
    border-radius: 15px;
    background-color: rgba(0, 0, 0, 0.35);
    .code-view-con {
      display: flex;
      display: -webkit-flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      margin: 20px;
      .phone {
        color: #fff;
        width: 100%;
        margin-top: 30px;
        font-size: 20px;
      }
    }
  }
}
@media screen and (device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2) {
      .code-view {
        height: 60vh;
        top:15%;
      }
    }
</style>
